<!--
 * @Date: 2019-08-08 20:22:34
 * @LastEditors: wangsh
 * @Author: wangsh
 * @Description: 日期控件
 -->
<template>
  <el-date-picker
    v-model="currentDate"
    :value-format="format"
  />
</template>

<script>
export default {
  props: {
    value: {
      type: String
    },
    format: {
      type: String,
      default: 'yyyy-MM-dd'
    }
  },
  computed: {
    currentDate: {
      get() {
        return this.value
      },
      set(val) {
        this.$emit('input', val)
      }
    }
  }
}
</script>
